<template>
  <div>
    <!--
  <iframe :src="pdfPath" width=900 height=500>

    This browser does not support PDFs. Please download the PDF to view it: <a :href="pdfPath">Download PDF</a>

  </iframe>
  -->
  </div>
</template>

<script>
import { m } from "@/store/yg/common/local";
import * as constant from '@/store/yg/common/constant'

export default {
  data() {
    return {
      values: {}
    };
  },
  computed: {
    pdfPath() {
      let row = this.$store.state.edit.row;
      return constant.API_SERVER + '/open/uploadfetch?file='
      + row.code + "-ps.pdf" + '&path=' + 'pdf' + '&type=application/pdf';
    }
  },
  methods: {
    m(k) {
      return m(k, true);
    },
    callafter(res) {
      if (res.code != 200) {
        return;
      }
      window.open(this.pdfPath, '_blank');
    }
  },
  created() {
  }
};
</script>
